<?=$this->load->view('include_header',null)?>
<style type="text/css">
form#form input {
	padding:3px;
	margin-bottom:5px;
	_width:expression(type=="text"?style:style);
}

form#form input[type="text"]
{
 width:auto;
} 
</style>
	<div id="wrapper">
		<form id="form" action="<?=site_url('manager/table_pdf_update')?>" method="post">
		  <FIELDSET class=options>
		  <LEGEND>修改表与PDF对应关系</LEGEND>
		  
		  <DIV class=formelementrow id="disp_area" >
			<LABEL for=doc_cn_name>文档中文名称：</LABEL><input name="doc_cn_name" type="text" id="doc_cn_name" value="<?=$doc->doc_cn_name?>" size="50" />
			<BR />
			<LABEL for=doc_en_name>文档英文名称：</LABEL><input name="doc_en_name" type="text" id="doc_en_name" value="<?=$doc->doc_en_name?>" size="50" />
			<BR />
			<LABEL for=base_category>分类：</LABEL>
			<select id="base_category" name="base_category">
			<?php foreach($base_category as $k => $v){?><option value="<?= $k?>" <?= ($doc->base_category==$k)?"selected":""?>><?= $v?></option><?php }?></select>
			<hr />
			<LABEL for=table_name>对应的表名：</LABEL><input name="table_name" type="text" id="table_name" value="<?=$doc->table_name?>" size="50"/> 本字段重要，请勿随意修改!
			<BR />
			<LABEL for=pdf_name>对应的PDF名：</LABEL><input name="pdf_name" type="text" id="pdf_name" value="<?=$doc->pdf_name?>" size="50" />
			<BR />
			
		  </DIV>
		  </FIELDSET>
		  <FIELDSET class=tblFooters>
		  <input type="hidden" name="id" value="<?=$doc->id?>" />
		  <INPUT id=button1 type=submit value=修改>
		  </FIELDSET>
		</form>
	</div>
	
<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
       doc_cn_name: {
         required:true,
         rangelength:[2,100]
       },
       doc_en_name: {
         required:true,
         rangelength:[2,100]
       },
       base_category: {
         required:true
       },
	   table_name: {
         required:true,
         rangelength:[2,100]
       },
	   pdf_name: {
         required:true,
         rangelength:[2,100]
       }
    }
  });
});
</script>
	
<?=$this->load->view('include_footer',null)?>
